elastic-tar-install:
    file.managed: #cp文件到minion端
        - name: /usr/local/src/node-linux-x64.tar.xz
        - source: salt://nodejs/files/node-v10.15.3-linux-x64.tar.xz
        - user: root
        - group: root
        - mode: 644

    cmd.run: #执行本地命令
        - name:  tar xf  /usr/local/src/node-linux-x64.tar.xz -C /usr/local && mv   /usr/local/node-v* /usr/local/node && ln -s /usr/local/node/bin/* /usr/bin/
        - unless: test -d  /usr/local/node
        - require:
            - file: /usr/local/src/node-linux-x64.tar.xz
